package com.leyou.personnel.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.leyou.personnel.data.dto.AdministratorsManagerDto;
import com.leyou.personnel.data.entity.AdministratorsManager;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xhh
 * @since 2022-05-18
 */
public interface AdministratorsManagerMapper extends BaseMapper<AdministratorsManager> {
    @Results(id = "administratorsRoleId",
            value = @Result(
                    column = "role_number",property = "administratorsRole",
                    one = @One (select = "com.leyou.personnel.mapper.AdministratorsRoleMapper.selectById")
            )
    )
    @Select("SELECT * FROM administrators_manager ${ew.customSqlSegment}")
    IPage<AdministratorsManagerDto> managerList(IPage<AdministratorsManagerDto> iPage, @Param(Constants.WRAPPER) Wrapper wrapper);
    @Select("SELECT * FROM administrators_manager ${ew.customSqlSegment}")
    IPage<AdministratorsManager> testIPage(IPage<AdministratorsManager> iPage, @Param(Constants.WRAPPER) Wrapper wrapper);
}
